<form id="baseForm" action="${urlPrefix}${urlSuffix}" class="am-form">
    <table class="am-form">
        <tr>
            <td>品牌：</td>
            <input type="hidden" name="brandId" id="brandId" value="${brandId!}"/>
            <input type="hidden" name="isShow" id="isShow" value="${isShow!}"/>
            [@cate_brand categoryId=category.id]
            <td><span class="all"><a [#if !(brandId??)]style="cursor:pointer"[/#if] onclick="clickBrand('');">全部</a></span>
                  <span  id="FacetBrandsAll">
                  [#list tag_list as brd]
                  	 [#if brd_index lt 12]
                    	<a style="cursor:pointer" [#if brandId??][#if brandId==brd.id]class="cur"[/#if][/#if] onclick="clickBrand(${brd.id},0);">${brd.name!}</a>
                      [#else]
                        <a style="cursor:pointer" [#if brandId??][#if brandId==brd.id]class="cur"[/#if][/#if]  onclick="clickBrand(${brd.id},1);" [#if isShow==0] style="display:none"[/#if]>${brd.name!}</a>
                      [/#if]
                   [/#list]
                  </span>
            </td>
            <td class="more">
                [#if !(tag_list?size lt 12)]
                <a [#if isShow==1]class="pack" style="display:none"[/#if] id="FacetBrandsMoreBtn"
                onclick="showMore('FacetBrandsAll','more')" href="javascript:void(0)" >更多</a>
                <a [#if isShow==0]class="pack" style="display:none"[/#if] id="FacetBrandsBackBtn"
                onclick="showMore('FacetBrandsAll','back')" href="javascript:void(0)" >收起</a>
                [/#if]
            </td>
            [/@cate_brand]
        </tr>
        <!--判断是要被隐藏的属性部分是否有被选中的属性，如果有则显示隐藏部分-->
        [#list map?keys as mykey]
        [#assign mlist=map[mykey]]
        [#assign st=map1[mykey]]
        [#if 0<(fields?size)]
        <tr>
            <td>${st.name!}：</td>
            <td>
                [#list fields as field]
                [#if field==st.field]
                [#list zhis as zhi]
                [#if field_index==zhi_index]
                 	 <span class="all">
                     	<a [#if zhi=="0"]class="cur" [/#if] onclick="clickchang('exended_${st.field}','');">全部</a>
                 	 </span>
                  	 <span class="selection">
                     	<input type="hidden" id="exended_${st.field}" name="exended_${st.field}" value="${zhi}"/>
                    	[#list mlist as m]
                    	 	<a [#if zhi=="${m.id}"]class="cur" [/#if] onclick="clickchang('exended_${st.field}','${m.id}');">${m.name!}</a>
                         [/#list]
                 	 </span>
                [/#if]
                [/#list]
                [/#if]
                [/#list]
            </td>
        </tr>
        [#else]
        <tr>
            <td>${st.name!}：</td>
            <td>
		                  <span class="all">
		                     <a class="cur" onclick="clickchang('exended_${st.field}','');">全部</a>
		                  </span>
		                  <span class="selection">
		                     <input type="hidden" id="exended_${st.field}" name="exended_${st.field}" value=""/>
		                    [#list mlist as m]
		                     <a onclick="clickchang('exended_${st.field}','${m.id}');">${m.name!}</a>
		                    [/#list]
		                  </span>
            </td>
        </tr>
        [/#if]
        [/#list]
    </table>
    <!-- 排序方式与布局方式切换区 -->
<div class="am-g">
    <div class="am-u-sm-6 am-u-md-6">
        <div class="am-btn-toolbar">
            <div class="am-btn-group am-btn-group-xs">
                <input type="hidden" id="orderBy" name="orderBy">
                <button type="button" class="am-btn am-btn-default" onclick="clickOrderBy(0);"><i></i>默认排序</button>
                <button type="button" class="am-btn am-btn-default"  onclick="clickOrderBy(4);"><i [#if orderBy==4] class="am-icon-arrow-up" [#else]class="am-icon-arrow-down"[/#if]></i> 销量</button>
                [#if orderBy==7]
                <button type="button" class="am-btn am-btn-default"  onclick="clickOrderBy(6);"><i  class="am-icon-arrow-up"></i> 价格</button>
                [#elseif orderBy==6]
                <button type="button" class="am-btn am-btn-default"  onclick="clickOrderBy(7);"><i class="am-icon-arrow-down" ></i> 价格</button>
                [#else]
                <button type="button" class="am-btn am-btn-default"  onclick="clickOrderBy(7);"><i class="am-icon-arrows-v"></i> 价格</button>

                [/#if]
                <button type="button" class="am-btn am-btn-default"  onclick="clickOrderBy(2);"><i  [#if orderBy==2]class="am-icon-arrow-up"[#else]class="am-icon-arrow-down"[/#if]></i> 上架时间</button>

            </div>
        </div>
    </div>

</div>
</form>